Optimal. Leaf size=177 \[ -\frac {a \left (a^2-2 b^2\right ) (a+b \sec (c+d x))^{n+1}}{b^4 d (n+1)}+\frac {\left (3 a^2-2 b^2\right ) (a+b \sec (c+d x))^{n+2}}{b^4 d (n+2)}-\frac {3 a (a+b \sec (c+d x))^{n+3}}{b^4 d (n+3)}+\frac {(a+b \sec (c+d x))^{n+4}}{b^4 d (n+4)}-\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a d (n+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.20, antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3885, 952, 1620, 65} \[ -\frac {a \left (a^2-2 b^2\right ) (a+b \sec (c+d x))^{n+1}}{b^4 d (n+1)}+\frac {\left (3 a^2-2 b^2\right ) (a+b \sec (c+d x))^{n+2}}{b^4 d (n+2)}-\frac {3 a (a+b \sec (c+d x))^{n+3}}{b^4 d (n+3)}+\frac {(a+b \sec (c+d x))^{n+4}}{b^4 d (n+4)}-\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a d (n+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 952
Rule 1620
Rule 3885
Rubi steps
\begin {align*} \int (a+b \sec (c+d x))^n \tan ^5(c+d x) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n \left (b^2-x^2\right )^2}{x} \, dx,x,b \sec (c+d x)\right )}{b^4 d}\\ &=\frac {(a+b \sec (c+d x))^{4+n}}{b^4 d (4+n)}+\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n \left (b^4 (4+n)-a^3 (4+n) x-\left (3 a^2+2 b^2\right ) (4+n) x^2-3 a (4+n) x^3\right )}{x} \, dx,x,b \sec (c+d x)\right )}{b^4 d (4+n)}\\ &=\frac {(a+b \sec (c+d x))^{4+n}}{b^4 d (4+n)}+\frac {\operatorname {Subst}\left (\int \left (-a \left (a^2-2 b^2\right ) (4+n) (a+x)^n+\frac {\left (4 b^4+b^4 n\right ) (a+x)^n}{x}+\left (3 a^2-2 b^2\right ) (4+n) (a+x)^{1+n}-3 a (4+n) (a+x)^{2+n}\right ) \, dx,x,b \sec (c+d x)\right )}{b^4 d (4+n)}\\ &=-\frac {a \left (a^2-2 b^2\right ) (a+b \sec (c+d x))^{1+n}}{b^4 d (1+n)}+\frac {\left (3 a^2-2 b^2\right ) (a+b \sec (c+d x))^{2+n}}{b^4 d (2+n)}-\frac {3 a (a+b \sec (c+d x))^{3+n}}{b^4 d (3+n)}+\frac {(a+b \sec (c+d x))^{4+n}}{b^4 d (4+n)}+\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n}{x} \, dx,x,b \sec (c+d x)\right )}{d}\\ &=-\frac {a \left (a^2-2 b^2\right ) (a+b \sec (c+d x))^{1+n}}{b^4 d (1+n)}-\frac {\, _2F_1\left (1,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}+\frac {\left (3 a^2-2 b^2\right ) (a+b \sec (c+d x))^{2+n}}{b^4 d (2+n)}-\frac {3 a (a+b \sec (c+d x))^{3+n}}{b^4 d (3+n)}+\frac {(a+b \sec (c+d x))^{4+n}}{b^4 d (4+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 3.31, size = 298, normalized size = 1.68 \[ -\frac {\sec ^8\left (\frac {1}{2} (c+d x)\right ) (a+b \sec (c+d x))^n \left (n (a \cos (c+d x)+b) \left (3 a^3 \cos (3 (c+d x))+3 a \left (3 a^2+b^2 \left (n^2-n-8\right )\right ) \cos (c+d x)+2 b (n+1) \left (b^2 \left (n^2+7 n+12\right )-3 a^2\right ) \cos (2 (c+d x))-6 a^2 b n-6 a^2 b-a b^2 n^2 \cos (3 (c+d x))-7 a b^2 n \cos (3 (c+d x))-12 a b^2 \cos (3 (c+d x))+4 b^3 n^2+16 b^3 n+12 b^3\right )-2 b^4 \left (n^4+10 n^3+35 n^2+50 n+24\right ) \cos ^4(c+d x) \, _2F_1\left (1,-n;1-n;\frac {a \cos (c+d x)}{b+a \cos (c+d x)}\right )\right )}{2 b^4 d n (n+1) (n+2) (n+3) (n+4) \left (\tan ^2\left (\frac {1}{2} (c+d x)\right )-1\right )^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.52, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{5}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{5}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.24, size = 0, normalized size = 0.00 \[ \int \left (a +b \sec \left (d x +c \right )\right )^{n} \left (\tan ^{5}\left (d x +c \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{5}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\left (c+d\,x\right )}^5\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right )^{n} \tan ^{5}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________